import java.util.*;
import java.sql.*;
class JdbcDemo13 {
	public static void main(String args[]) throws Exception
	{
		Class.forName("oracle.jdbc.driver.OracleDriver");
		Connection cn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","system","oracle");
		PreparedStatement ps = cn.prepareStatement("insert into employee values(?,?,?)");
		Scanner scan = new Scanner(System.in);
		System.out.println("input empno");
		int eno = scan.nextInt();
		System.out.println("input emp name");
		String ename = scan.next();
		System.out.println("input salery");
		Float sal = scan.nextFloat();
		ps.setInt(1, eno);
		ps.setString(2, ename);
		ps.setFloat(3, sal);
		int count = ps.executeUpdate();
		System.out.println(count);
		ps.close();
		cn.close();
		ps = null;
		cn = null;
	}

}
